package exception;

public class TryCatchDemo {
    public static void main(String[] args) {
        System.out.println("main start...");
        try {
//            String str = "hello";
            String str = "123";
            System.out.println(Integer.parseInt(str));
            System.out.println("!!!!!!!!!!!");
        } catch (NullPointerException | NumberFormatException | StringIndexOutOfBoundsException exception) {
            System.out.println("出现了空指针异常或者下标越界异常或者数字格式异常");
        } catch (Exception e) {
            System.out.println("出现了异常");
        }
        System.out.println("main end...");
    }
}
